<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
	<style>
		html, body {
			margin: 0;
			padding: 0;
			width: 100%;
			height: 100%;
			font-family: "STHeiti", "黑体-简", "黑体", "Microsoft Yahei";
		}

		body {
			background: #F0F0FF;
		}
	</style>
</head>
<body>
	<div>
		<div id="labelToken"></div>
		<button onclick="localStorage.removeItem('token'); labelToken.innerText = localStorage.getItem('token')">清除token</button>
		<button onclick="localStorage.setItem('token', 'xx' + token); labelToken.innerText = localStorage.getItem('token')">token失效</button><br><br>
		<input style="width:80%" id="inputToken" /><br>
		<button onclick="localStorage.setItem('token', inputToken.value); labelToken.innerText = inputToken.value">设置token</button>
	</div>
	<script>
		var token = localStorage.getItem('token');
		labelToken.innerText = token;
	</script>
</body>
</html>
